  'use strict';
var app = angular.module('w5app', ['ngRoute', 'ngAnimate', 'ngMaterial']);
//var app = angular.module('w5app', []);
app.config(['$routeProvider', function($routeProvider) {
    $routeProvider
        .when("/", {
            templateUrl: "partials/w5-home.html",
            controller: 'homeController'
        })
        .when("/home", {
            templateUrl: "partials/w5-home.html",
            controller: 'homeController'
        })
        .when("/about", {
            templateUrl: "partials/w5-about.html",
            controller: 'aboutController'
        })
        .otherwise({
        	redirectTo: '/'
    	});
}]);
app.controller('MainCtrl', ['$route', '$routeParams', '$location',
function($route, $routeParams, $location) {
  this.$route = $route;
  this.$location = $location;
  this.$routeParams = $routeParams;
}]);
app.controller('homeController', ['$scope',function($scope) {
    $scope.name = "This is Home, mainController!";
}]);
app.controller('aboutController', ['$scope',function($scope) {
    $scope.name = "This is About, aboutController!";
}]);
